{include file="public/header" /}
<link rel="stylesheet" href="/static/index/css/page/record.css">
<body>
<div class="build-navbar" data-title="提现记录"></div>
<div class="main">
    <div class="tab flex justify-between items-center">
        {foreach name="tab" item="vo" key='key'}
        <div data-type="{$key}" class="item {if !$key}lay-this{/if}" lay-change="status">{$vo}</div>
        {/foreach}
    </div>
    <div class="tpl_list"></div>
</div>
</body>
<script id="template" type="text/html">
    {{# for(var i=0;i < d.data.length ;i++){ }}
    <div class="items m-30 p-30">
        <div class="piece flex items-center justify-between">
            <div class="middle flex items-center justify-center">
                {{# if(d.data[i].mode == '支付宝'){ }}
                <img src="/static/index/images/payment/alipay.png" alt="" class="icon">
                {{# }else if(d.data[i].mode == '微信'){ }}
                <img src="/static/index/images/payment/wechat.png" alt="" class="icon">
                {{# }else{ }}
                <img src="/static/index/images/payment/bank.png" alt="" class="icon">
                {{# } }}
                <span>{{d.data[i].mode}}</span>
            </div>
            <div class="formal">-{{d.data[i].money}}</div>
        </div>
        <div class="piece flex items-center justify-between">
            <div class="desc">{{d.data[i].create_time}}</div>
            <div class="desc"><span class="status-{{d.data[i].status}}">{{d.data[i].statusText}}</span>({{d.data[i].account}})
            </div>
        </div>
        {{# if(d.data[i].status == 3 && d.data[i].reject_msg){ }}
        <div class="piece flex items-center justify-between">
            <div class="desc status-3">原因：{{d.data[i].reject_msg}}</div>
        </div>
        {{# } }}
    </div>
    {{# } }}
</script>
{include file="public/footer"/}
<script>
    layui.use(['methods'], function () {
        var m = layui.methods, a = layui.jquery;
        getList(a('.lay-this').attr('data-type'));
        m.event.change('status', function (data, that) {
            getList(data.type);
        });
        function getList(type = '') {
            m.getFlowData('{:url("draw/getList")}?type=' + type);
        }
    });
</script>
</html>